package com.dctp.common.db;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import java.util.List;

public class TradeTimeDb {
    public static List<Record> findByFuturesId(Long futuresId) {
        return Db.find("SELECT * FROM dctp_futures_trade_time WHERE futures_id = ? ORDER BY begin_time ASC", futuresId);
    }

    public static Record findById(Long id) {
        return Db.findFirst("SELECT * FROM dctp_futures_trade_time WHERE id = ?", id);
    }
}
